<template>
<div class="audit-panel-group">
    <div class="panel">
        <div class="panel-header bd">
            <div class="bl"></div>
            <div class="title">{{ protocol.type_tag + '协议' }}</div>
        </div>
        <div class="panel-body">
            <div class="list-group">

                <div class="list-item">
                    <div class="row">
                        <div class="title">餐标</div>
                        <div class="value">{{ protocol.price }}</div>
                    </div>
                </div>

                <div class="list-item">
                    <div class="row">
                        <div class="title"></div>
                        <div class="value">{{ protocol.amount }}</div>
                    </div>
                </div>

                <div class="list-item">
                    <div class="row">
                        <div class="title">优惠金额</div>
                        <div class="value">{{ protocol.discount }}</div>
                    </div>
                </div>

                <div class="list-item">
                    <div class="row">
                        <div class="title">金额小计</div>
                        <div class="value">{{ protocol.total }}</div>
                    </div>
                </div>

                <template v-if="protocol.type == 0">
                    <div class="list-item">
                        <div class="row">
                            <div class="title">付定金金额</div>
                            <div class="value">{{ protocol.earnest_money }}</div>
                        </div>
                    </div>

                    <div class="list-item">
                        <div class="row">
                            <div class="title">付定金日期</div>
                            <div class="value">{{ protocol.earnest_date }}</div>
                        </div>
                    </div>

                    <div class="list-item">
                        <div class="row">
                            <div class="title">付中款金额</div>
                            <div class="value">{{ protocol.middle_money }}</div>
                        </div>
                    </div>

                    <div class="list-item">
                        <div class="row">
                            <div class="title">付中款日期</div>
                            <div class="value">{{ protocol.middle_date }}</div>
                        </div>
                    </div>

                    <div class="list-item">
                        <div class="row">
                            <div class="title">付尾款金额</div>
                            <div class="value">{{ protocol.tail_money }}</div>
                        </div>
                    </div>

                    <div class="list-item">
                        <div class="row">
                            <div class="title">付尾款日期</div>
                            <div class="value">{{ protocol.tail_date }}</div>
                        </div>
                    </div>
                </template>

                <div class="list-item" v-if="protocol.remark">
                    <div class="row">
                        <div class="title">备注</div>
                        <div class="value"></div>
                    </div>
                    <div class="intro">{{ protocol.remark }}</div>
                </div>

                <div class="list-item">
                    <div class="row">
                        <div class="title">附件</div>
                        <div class="value"></div>
                    </div>
                    <div class="intro">
                        <div v-if="protocol.files.length > 0" class="order-files">
                            <upload-file-list :file-list="protocol.files"></upload-file-list>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</template>

<script>
import uploadFileList from '@/components/files/index';

export default {
    name: "AuditProtocol",
    components: {
        uploadFileList
    },
    props: {
        protocol: {
            type: Object,
            default: function () {
                return {};
            }
        }
    },
    data() {
        return {

        };
    },
    methods: {

    }
}
</script>
